package hd.cls2;
import java.io.*;
import java.util.Date;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileTest {
    public static void main(String[] args) {
        File f=new File("J:\\documents\\桌面\\blockchain");
        System.out.println("是文件夹？"+f.isDirectory());
        System.out.println("在？"+f.exists());
        System.out.println("大小："+f.length());
        System.out.println("最后需改时间？"+new Date(f.lastModified()));
        String[] list = f.list();
        for(String s:list){//递归
            System.out.println(s);
        }
    }
}
